package com.bristua.order.controller;

import com.bristua.common.bean.Result;
import com.bristua.common.utils.HandleResultUtil;
import com.bristua.order.biz.OrderDeliverGoodsBiz;
import com.bristua.order.enums.OrderCode;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2019/4/26.
 */
@RestController
@Api(value="发货",tags={"发货"})
public class OrderDeliverGoodsController {
    @Autowired
    private OrderDeliverGoodsBiz orderDeliverGoodsBiz;
    @ApiOperation(value="发货")
    @PostMapping(value="/admin/order/delivergoods/{orderId}/{logisticsNumber}")
    public Result orderDeliverGoods(@PathVariable(value="orderId") String orderId, @PathVariable(value = "logisticsNumber") String logisticsNumber){
        orderDeliverGoodsBiz.orderDeliverGoods(orderId,logisticsNumber);
        return HandleResultUtil.commonResult(OrderCode.DELIVER_GOODS_SUCCESS.getCode(),OrderCode.DELIVER_GOODS_SUCCESS.getMsg());
    }
}
